package user.Service;

import common.model.Appeal;
import common.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import user.repository.UserRepository;

import java.util.List;

@Service
public class UserService {

    @Autowired
    private UserRepository userRepository;

    public User updateProfile(User user) {
        return userRepository.save(user);
    }

    public User getProfile(Long id) {
        return userRepository.findById(id).orElseThrow(() -> new RuntimeException("User not found"));
    }

    public void appealFreeze(Appeal appeal) {
        // 实现冻结申诉逻辑
    }

}